package cn.com.nes.common.em.platform;

import cn.com.nes.site.config.CustomConfigurationProperties;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public enum CallMethodEnum {

    callCenterToken("获取长效管护token", "/operationUser/getCcToken"),
    SAVE_USER_SERVICE_STAFF("创建客服中心客服", "/user/agentSaveUserServiceStaff"),

    FORWARD("解决客服中心跨域问题并连接服务器", "/comecall/forward"),
    FINDALLQUEUE("连接客服服务器接口", "/comecall/findAllQueue"),
    DEVICESTATUS("连接客服服务器接口", "/comecall/listClient"),
    QUEUEDETAIL("连接客服服务器接口","/comecall/queueDetail"),
    DEVICEFINDHIS("连接客服服务器接口","/comecall/deviceFindHis"),
    LISTEXTENSION("解决客服中心跨域问题并连接服务器", "/comecall/listExtension"),
    UPDATE_USER_SERVICE_STAFF("修改客服中心客服", "/user/agentUpdateUserServiceStaff"),
    DELETE_USER_SERVICE_STAFF("删除客服中心客服", "/user/deleteUserServiceStaff"),
    INSTALL_PERSON_LIST("查询安装人员列表-不分页", "/user/installUser/getInstallUserList"),
    SAVE_WORK_ORDER("创建长效管护安装工单", "/crm/workOrderInstall/saveWorkOrder"),
    GET_WORK_ORDER_INSTALL_PAGE("查询安装工单分页", "/workorder/getWorkOrderList"),
    GET_WORK_ORDER_INSTALL_DETAIL("查询安装工单详情", "/crm/workOrderInstall/getWorkOrderDetail"),
    COMPANY_APPLY_PAGE("查询客服中心申请分页列表", "/companyApply/companyApplyPage"),
    COMPANY_APPLY_CHECK("客服中心申请审核","/companyApply/companyApplyCheck"),
    ;

    private static String URL = CustomConfigurationProperties.getCallUrl() + "/" + PlatformEnum._call.getServerContext();

    private final String remark;

    private final String method;

    CallMethodEnum(String remark, String method) {
        this.remark = remark;
        this.method = method;
    }

    public String getRemark() {
        return remark;
    }

    public String url() {
        log.info("{}", URL + method);
        return URL + method;
    }

}
